import request from '@/utils/request'

/**
 * 获取轮播图列表
 */
export function getCarouselList() {
  return request({
    url: '/carousel',
    method: 'get'
  })
}

/**
 * 新增轮播图
 */
export function addCarousel(data) {
  return request({
    url: '/carousel',
    method: 'post',
    data
  })
}

/**
 * 修改轮播图
 */
export function modifyCarousel(id,data) {
  return request({
    url: `/carousel/${id}`,
    method: 'put',
    data
  })
}

/**
 * 删除轮播图
 */
export function deleteCarousel(id) {
  return request({
    url: `/carousel/${id}`,
    method: 'delete'
  })
}